home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / algsurf.h < prev    next >
C/C++ Source or Header  |  1993-06-21  |  838b  |  47 lines

  1. #define    TABLESIZE 4096
  2.  
  3. struct _point
  4. {
  5.   float xcoor;
  6.   float ycoor;
  7.   float zcoor;
  8. };
  9. typedef struct _point point;
  10.  
  11. struct edge {
  12.   float p[3], p1;
  13.   int axis;
  14.   float pcross;
  15.   int used;
  16.   int index;
  17.   struct edge *link;
  18.   struct edge *prev;
  19.   struct edge *prevPoint;
  20. };
  21.  
  22. struct face {
  23.   int numEdges;
  24.   struct face *prev;
  25. };
  26.  
  27. struct edgeList {
  28.   struct edge *edge;
  29.   struct edgeList *prev;
  30. };
  31.  
  32. typedef struct Surface {
  33.   int numVert, numPoly, numTotal;
  34.   struct face *face;
  35.   struct edgeList *edge;
  36.   struct edge *lastEdge; 
  37.   struct face *lastFace;
  38.   struct edgeList *lastE;
  39.   struct edge *hashtable[TABLESIZE];
  40. } Surface;
  41.  
  42. typedef float (*SurfaceFunc)(float x, float y, float z);
  43.  
  44. extern Surface *algsurf(float xmin, float ymin, float zmin, 
  45.               float xmax, float ymax, float zmax, 
  46.           int N, SurfaceFunc f, float M);
  47.